import request from '@/utils/request'

// 查询企业通讯录列表
export function listEmployee(query) {
  return request({
    url: '/wework/employee/list',
    method: 'get',
    params: query
  })
}

// 同步企业成员
export function syncEmployee (params) {
  return request({
    url: '/wework/employee/syncEmployee',
    method: 'put',
    data: params
  })
}
// 查询企业通讯录详细
export function getEmployee(id) {
  return request({
    url: '/wework/employee/' + id,
    method: 'get'
  })
}

// 新增企业通讯录
export function addEmployee(data) {
  return request({
    url: '/wework/employee',
    method: 'post',
    data: data
  })
}

// 修改企业通讯录
export function updateEmployee(data) {
  return request({
    url: '/wework/employee',
    method: 'put',
    data: data
  })
}

// 删除企业通讯录
export function delEmployee(id) {
  return request({
    url: '/wework/employee/' + id,
    method: 'delete'
  })
}

// 导出企业通讯录
export function exportEmployee(query) {
  return request({
    url: '/wework/employee/export',
    method: 'get',
    params: query
  })
}
